
/*******************************************************************************
 Copyright (c) 2014, Infineon Technologies AG                                 **
 All rights reserved.                                                         **
                                                                              **
 Redistribution and use in source and binary forms, with or without           **
 modification,are permitted provided that the following conditions are met:   **
                                                                              **
 *Redistributions of source code must retain the above copyright notice,      **
 this list of conditions and the following disclaimer.                        **
 *Redistributions in binary form must reproduce the above copyright notice,   **
 this list of conditions and the following disclaimer in the documentation    **
 and/or other materials provided with the distribution.                       **
 *Neither the name of the copyright holders nor the names of its contributors **
 may be used to endorse or promote products derived from this software without**
 specific prior written permission.                                           **
                                                                              **
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"  **
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE    **
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   **
 ARE  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE   **
 LIABLE  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR         **
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF         **
 SUBSTITUTE GOODS OR  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS    **
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN      **
 CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)       **
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE   **
 POSSIBILITY OF SUCH DAMAGE.                                                  **
                                                                              **
 To improve the quality of the software, users are encouraged to share        **
 modifications, enhancements or bug fixes with Infineon Technologies AG       **
 dave@infineon.com).                                                          **
                                                                              **
********************************************************************************
**                                                                            **
**                                                                            **
** PLATFORM : Infineon <Microcontroller name, step>                           **
**                                                                            **
** COMPILER : Compiler Independent                                            **
**                                                                            **
** MODIFICATION DATE : June 16, 2014                                          **
**                                                                            **
*******************************************************************************/
/**
 * @file  DAVE.c
 *
 * @brief This file contains implementation of initialization functions calling sequence. 
 *
 * Revision History
 * 16 June 2014 v0.3.0 Initial Version
 */

/*******************************************************************************
**                      Include Files                                         **
*******************************************************************************/
#include "DAVE.h"

/*******************************************************************************
**                 Function declarations                                     **
*******************************************************************************/

/*******************************************************************************
 * @brief This function initializes the Apps Init Functions.
 * 
 * @param[in]  None
 *
 * @return  None <BR>
 *
 * <b>Reentrant: No </b><BR>
 *
 ******************************************************************************/

DAVE_STATUS_t DAVE_Init(void)
{
  DAVE_STATUS_t init_status;
  
  init_status = DAVE_STATUS_SUCCESS;

      

/** @Initialization of Apps Init Functions */


  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of HRPWM App instance PWM_A_B */
    init_status = (DAVE_STATUS_t)HRPWM_Init(&PWM_A_B);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of HRPWM App instance PWM_C */
    init_status = (DAVE_STATUS_t)HRPWM_Init(&PWM_C);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of HRPWM App instance PWM_D */
    init_status = (DAVE_STATUS_t)HRPWM_Init(&PWM_D);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_BRIDGE_TRAP */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_BRIDGE_TRAP);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of EVENT_GENERATOR App instance OGU_RESET_D */
    init_status = (DAVE_STATUS_t)EVENT_GENERATOR_Init(&OGU_RESET_D);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of EVENT_DETECTOR App instance ERU_RESET_D */
    init_status = (DAVE_STATUS_t)EVENT_DETECTOR_Init(&ERU_RESET_D);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of EVENT_GENERATOR App instance OGU_RESET_C */
    init_status = (DAVE_STATUS_t)EVENT_GENERATOR_Init(&OGU_RESET_C);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of EVENT_DETECTOR App instance ERU_RESET_C */
    init_status = (DAVE_STATUS_t)EVENT_DETECTOR_Init(&ERU_RESET_C);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_B_RESET_C */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_B_RESET_C);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_A_BLK */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_A_BLK);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_B_BLK */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_B_BLK);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_Ai_RESET_D */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_Ai_RESET_D);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 App instance PWM_E */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_E);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 App instance PWM_F */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_F);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_SYNC_TRAP */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_SYNC_TRAP);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_FALL_B_TO_F */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_FALL_B_TO_F);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_FALL_A_TO_E */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_FALL_A_TO_E);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of INTERRUPT App instance IRQ_BURST_CTRL */
    init_status = (DAVE_STATUS_t)INTERRUPT_Init(&IRQ_BURST_CTRL);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of COUNTER App instance BURST_CNT */
    init_status = (DAVE_STATUS_t)COUNTER_Init(&BURST_CNT);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_D_BURST */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_D_BURST);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of UART App instance PC_COMM */
    init_status = (DAVE_STATUS_t)UART_Init(&PC_COMM);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance RED_LED */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&RED_LED);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance BLUE_LED */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&BLUE_LED);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU8 App instance PWM_FAN */
    init_status = (DAVE_STATUS_t)PWM_CCU8_Init(&PWM_FAN);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_FAN_FEEDBACK */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_FAN_FEEDBACK);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of COUNTER App instance FAN_CNT */
    init_status = (DAVE_STATUS_t)COUNTER_Init(&FAN_CNT);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 App instance PWM_STOP_E */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_STOP_E);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 App instance PWM_STOP_F */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_STOP_F);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 App instance PWM_BLK_CSG0 */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_BLK_CSG0);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_BLK_CSG0 */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_BLK_CSG0);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_D_BURST_CNT */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_D_BURST_CNT);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of PWM_CCU4 App instance PWM_B_RESET_C */
    init_status = (DAVE_STATUS_t)PWM_CCU4_Init(&PWM_B_RESET_C);
  }  

  if (init_status == DAVE_STATUS_SUCCESS)
  {
    /**  Initialization of DIGITAL_IO App instance IO_MODE */
    init_status = (DAVE_STATUS_t)DIGITAL_IO_Init(&IO_MODE);
  }  
 

  return init_status;
} /**  End of function DAVE_Init */

